package com.sali.design_pattern.b_abstract_factory_pattern.lesson_02;

//import com.sali.design_pattern.abstract_factory_pattern.lession_02.mysql.MysqlDataSourceFactory;
//import com.sali.design_pattern.abstract_factory_pattern.lession_02.oracle.OracleDataSourceFactory;

import lombok.extern.slf4j.Slf4j;

/**
 * @description:
 * @author: zhang hang
 * @date: 2023/3/18 20:32.
 * @version: 1.0
 */
@Slf4j
public class Lesson02Starter {

    public static void main(String[] args) {
//        IDataSourceFactory mysqlDataSourceFactory = new MysqlDataSourceFactory();
//        IDataSource mysqlDruidDriverFactory = mysqlDataSourceFactory.createDruidDriverFactory();
//        IDataSource mysqlHkDriverFactory = mysqlDataSourceFactory.createHkDriverFactory();
//        DataSource dataSource1 = mysqlDruidDriverFactory.dataSource();
//        DataSource dataSource2 = mysqlHkDriverFactory.dataSource();
//        System.out.println(dataSource1);
//        log.info("mysql druid数据源---->{}", dataSource1);
//        System.out.println(dataSource2);
//        log.info("mysql hk数据源---->{}", dataSource2);


//        IDataSourceFactory oracleDataSourceFactory = new OracleDataSourceFactory();
//        IDataSource oracleDruidDriverFactory = oracleDataSourceFactory.createDruidDriverFactory();
//        IDataSource oracleHkDriverFactory = oracleDataSourceFactory.createHkDriverFactory();
//        DataSource dataSource3 = oracleDruidDriverFactory.dataSource();
//        DataSource dataSource4 = oracleHkDriverFactory.dataSource();
//        System.out.println(dataSource3);
//        log.info("oracle druid数据源---->{}", dataSource3);
//        System.out.println(dataSource4);
//        log.info("oracle hk数据源---->{}", dataSource4);
    }

}
